package com.zelin.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * Created by WF on 2020/4/2 14:59
 */
@Component
@RabbitListener(queues = "shz")
public class MyMessageListener08 {
    //1.监听获取到消息(收到以goods开头的消息)
    @RabbitHandler
    public void getMessage(String message){
        System.out.println("shz队列收到(goods.log)：" + message);
    }

}
